3.1.39 \(\int \frac {d+e x+f x^2+g x^3+h x^4}{(a+b x^2+c x^4)^2} \, dx\) [39]

3.1.39.1 Optimal result
3.1.39.2 Mathematica [A] (verified)
3.1.39.3 Rubi [A] (verified)
3.1.39.4 Maple [C] (verified)
3.1.39.5 Fricas [F(-1)]
3.1.39.6 Sympy [F(-1)]
3.1.39.7 Maxima [F]
3.1.39.8 Giac [B] (verification not implemented)
3.1.39.9 Mupad [B] (verification not implemented)

3.1.39.1 Optimal result

Integrand size = 35, antiderivative size = 439 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=-\frac {b e-2 a g+(2 c e-b g) x^2}{2 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {x \left (b^2 d-a b f-2 a (c d-a h)+(b c d-2 a c f+a b h) x^2\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {\left (b c d-2 a c f+a b h+\frac {4 a b c f+b^2 (c d-a h)-4 a c (3 c d+a h)}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{2 \sqrt {2} a \sqrt {c} \left (b^2-4 a c\right ) \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\left (b c d-2 a c f+a b h-\frac {4 a b c f+b^2 (c d-a h)-4 a c (3 c d+a h)}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{2 \sqrt {2} a \sqrt {c} \left (b^2-4 a c\right ) \sqrt {b+\sqrt {b^2-4 a c}}}+\frac {(2 c e-b g) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}} \]

output
1/2*(-b*e+2*a*g-(-b*g+2*c*e)*x^2)/(-4*a*c+b^2)/(c*x^4+b*x^2+a)+1/2*x*(b^2* 
d-a*b*f-2*a*(-a*h+c*d)+(a*b*h-2*a*c*f+b*c*d)*x^2)/a/(-4*a*c+b^2)/(c*x^4+b* 
x^2+a)+(-b*g+2*c*e)*arctanh((2*c*x^2+b)/(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^( 
3/2)+1/4*arctan(x*2^(1/2)*c^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2))*(b*c*d-2*a 
*c*f+a*b*h+(4*a*b*c*f+b^2*(-a*h+c*d)-4*a*c*(a*h+3*c*d))/(-4*a*c+b^2)^(1/2) 
)/a/(-4*a*c+b^2)*2^(1/2)/c^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2)+1/4*arctan(x 
*2^(1/2)*c^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2))*(b*c*d-2*a*c*f+a*b*h+(-4*a* 
b*c*f-b^2*(-a*h+c*d)+4*a*c*(a*h+3*c*d))/(-4*a*c+b^2)^(1/2))/a/(-4*a*c+b^2) 
*2^(1/2)/c^(1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2)
 
3.1.39.2 Mathematica [A] (verified)

Time = 1.09 (sec) , antiderivative size = 489, normalized size of antiderivative = 1.11 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=\frac {1}{4} \left (\frac {-4 a^2 (g+h x)-2 b d x \left (b+c x^2\right )+4 a c x (d+x (e+f x))+2 a b (e+x (f-x (g+h x)))}{a \left (-b^2+4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac {\sqrt {2} \left (b^2 (c d-a h)-2 a c \left (6 c d+\sqrt {b^2-4 a c} f+2 a h\right )+b \left (c \sqrt {b^2-4 a c} d+4 a c f+a \sqrt {b^2-4 a c} h\right )\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{a \sqrt {c} \left (b^2-4 a c\right )^{3/2} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\sqrt {2} \left (b^2 (-c d+a h)+2 a c \left (6 c d-\sqrt {b^2-4 a c} f+2 a h\right )+b \left (c \sqrt {b^2-4 a c} d-4 a c f+a \sqrt {b^2-4 a c} h\right )\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{a \sqrt {c} \left (b^2-4 a c\right )^{3/2} \sqrt {b+\sqrt {b^2-4 a c}}}+\frac {2 (-2 c e+b g) \log \left (-b+\sqrt {b^2-4 a c}-2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {2 (-2 c e+b g) \log \left (b+\sqrt {b^2-4 a c}+2 c x^2\right )}{\left (b^2-4 a c\right )^{3/2}}\right ) \]

input
Integrate[(d + e*x + f*x^2 + g*x^3 + h*x^4)/(a + b*x^2 + c*x^4)^2,x]
 
output
((-4*a^2*(g + h*x) - 2*b*d*x*(b + c*x^2) + 4*a*c*x*(d + x*(e + f*x)) + 2*a 
*b*(e + x*(f - x*(g + h*x))))/(a*(-b^2 + 4*a*c)*(a + b*x^2 + c*x^4)) + (Sq 
rt[2]*(b^2*(c*d - a*h) - 2*a*c*(6*c*d + Sqrt[b^2 - 4*a*c]*f + 2*a*h) + b*( 
c*Sqrt[b^2 - 4*a*c]*d + 4*a*c*f + a*Sqrt[b^2 - 4*a*c]*h))*ArcTan[(Sqrt[2]* 
Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(a*Sqrt[c]*(b^2 - 4*a*c)^(3/2)*Sq 
rt[b - Sqrt[b^2 - 4*a*c]]) + (Sqrt[2]*(b^2*(-(c*d) + a*h) + 2*a*c*(6*c*d - 
 Sqrt[b^2 - 4*a*c]*f + 2*a*h) + b*(c*Sqrt[b^2 - 4*a*c]*d - 4*a*c*f + a*Sqr 
t[b^2 - 4*a*c]*h))*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]] 
)/(a*Sqrt[c]*(b^2 - 4*a*c)^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) + (2*(-2*c*e 
 + b*g)*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*x^2])/(b^2 - 4*a*c)^(3/2) - (2*(- 
2*c*e + b*g)*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(b^2 - 4*a*c)^(3/2))/4
 
3.1.39.3 Rubi [A] (verified)

Time = 0.82 (sec) , antiderivative size = 429, normalized size of antiderivative = 0.98, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.257, Rules used = {2202, 1576, 1159, 1083, 219, 2206, 25, 1480, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx\)

\(\Big \downarrow \) 2202

\(\displaystyle \int \frac {h x^4+f x^2+d}{\left (c x^4+b x^2+a\right )^2}dx+\int \frac {x \left (g x^2+e\right )}{\left (c x^4+b x^2+a\right )^2}dx\)

\(\Big \downarrow \) 1576

\(\displaystyle \int \frac {h x^4+f x^2+d}{\left (c x^4+b x^2+a\right )^2}dx+\frac {1}{2} \int \frac {g x^2+e}{\left (c x^4+b x^2+a\right )^2}dx^2\)

\(\Big \downarrow \) 1159

\(\displaystyle \frac {1}{2} \left (-\frac {(2 c e-b g) \int \frac {1}{c x^4+b x^2+a}dx^2}{b^2-4 a c}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )+\int \frac {h x^4+f x^2+d}{\left (c x^4+b x^2+a\right )^2}dx\)

\(\Big \downarrow \) 1083

\(\displaystyle \frac {1}{2} \left (\frac {2 (2 c e-b g) \int \frac {1}{-x^4+b^2-4 a c}d\left (2 c x^2+b\right )}{b^2-4 a c}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )+\int \frac {h x^4+f x^2+d}{\left (c x^4+b x^2+a\right )^2}dx\)

\(\Big \downarrow \) 219

\(\displaystyle \int \frac {h x^4+f x^2+d}{\left (c x^4+b x^2+a\right )^2}dx+\frac {1}{2} \left (\frac {2 (2 c e-b g) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )\)

\(\Big \downarrow \) 2206

\(\displaystyle -\frac {\int -\frac {d b^2+a f b+(b c d-2 a c f+a b h) x^2-2 a (3 c d+a h)}{c x^4+b x^2+a}dx}{2 a \left (b^2-4 a c\right )}+\frac {1}{2} \left (\frac {2 (2 c e-b g) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )+\frac {x \left (x^2 (a b h-2 a c f+b c d)-a b f-2 a (c d-a h)+b^2 d\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \frac {d b^2+a f b+(b c d-2 a c f+a b h) x^2-2 a (3 c d+a h)}{c x^4+b x^2+a}dx}{2 a \left (b^2-4 a c\right )}+\frac {1}{2} \left (\frac {2 (2 c e-b g) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )+\frac {x \left (x^2 (a b h-2 a c f+b c d)-a b f-2 a (c d-a h)+b^2 d\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\)

\(\Big \downarrow \) 1480

\(\displaystyle \frac {\frac {1}{2} \left (\frac {b^2 (c d-a h)+4 a b c f-4 a c (a h+3 c d)}{\sqrt {b^2-4 a c}}+a b h-2 a c f+b c d\right ) \int \frac {1}{c x^2+\frac {1}{2} \left (b-\sqrt {b^2-4 a c}\right )}dx+\frac {1}{2} \left (-\frac {b^2 (c d-a h)+4 a b c f-4 a c (a h+3 c d)}{\sqrt {b^2-4 a c}}+a b h-2 a c f+b c d\right ) \int \frac {1}{c x^2+\frac {1}{2} \left (b+\sqrt {b^2-4 a c}\right )}dx}{2 a \left (b^2-4 a c\right )}+\frac {1}{2} \left (\frac {2 (2 c e-b g) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )+\frac {x \left (x^2 (a b h-2 a c f+b c d)-a b f-2 a (c d-a h)+b^2 d\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right ) \left (\frac {b^2 (c d-a h)+4 a b c f-4 a c (a h+3 c d)}{\sqrt {b^2-4 a c}}+a b h-2 a c f+b c d\right )}{\sqrt {2} \sqrt {c} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right ) \left (-\frac {b^2 (c d-a h)+4 a b c f-4 a c (a h+3 c d)}{\sqrt {b^2-4 a c}}+a b h-2 a c f+b c d\right )}{\sqrt {2} \sqrt {c} \sqrt {\sqrt {b^2-4 a c}+b}}}{2 a \left (b^2-4 a c\right )}+\frac {1}{2} \left (\frac {2 (2 c e-b g) \text {arctanh}\left (\frac {b+2 c x^2}{\sqrt {b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{3/2}}-\frac {-2 a g+x^2 (2 c e-b g)+b e}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\right )+\frac {x \left (x^2 (a b h-2 a c f+b c d)-a b f-2 a (c d-a h)+b^2 d\right )}{2 a \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}\)

input
Int[(d + e*x + f*x^2 + g*x^3 + h*x^4)/(a + b*x^2 + c*x^4)^2,x]
 
output
(x*(b^2*d - a*b*f - 2*a*(c*d - a*h) + (b*c*d - 2*a*c*f + a*b*h)*x^2))/(2*a 
*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + (((b*c*d - 2*a*c*f + a*b*h + (4*a*b* 
c*f + b^2*(c*d - a*h) - 4*a*c*(3*c*d + a*h))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sq 
rt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b - S 
qrt[b^2 - 4*a*c]]) + ((b*c*d - 2*a*c*f + a*b*h - (4*a*b*c*f + b^2*(c*d - a 
*h) - 4*a*c*(3*c*d + a*h))/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/S 
qrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]) 
)/(2*a*(b^2 - 4*a*c)) + (-((b*e - 2*a*g + (2*c*e - b*g)*x^2)/((b^2 - 4*a*c 
)*(a + b*x^2 + c*x^4))) + (2*(2*c*e - b*g)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 
- 4*a*c]])/(b^2 - 4*a*c)^(3/2))/2
 

3.1.39.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 1083
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2   Subst[I 
nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, 
x]
 

rule 1159
Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol 
] :> Simp[((b*d - 2*a*e + (2*c*d - b*e)*x)/((p + 1)*(b^2 - 4*a*c)))*(a + b* 
x + c*x^2)^(p + 1), x] - Simp[(2*p + 3)*((2*c*d - b*e)/((p + 1)*(b^2 - 4*a* 
c)))   Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] & 
& LtQ[p, -1] && NeQ[p, -3/2]
 

rule 1480
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] : 
> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(e/2 + (2*c*d - b*e)/(2*q))   Int[1/( 
b/2 - q/2 + c*x^2), x], x] + Simp[(e/2 - (2*c*d - b*e)/(2*q))   Int[1/(b/2 
+ q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] 
 && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^2 - 4*a*c]
 

rule 1576
Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^( 
p_.), x_Symbol] :> Simp[1/2   Subst[Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x] 
, x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]
 

rule 2202
Int[(Pn_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{n 
 = Expon[Pn, x], k}, Int[Sum[Coeff[Pn, x, 2*k]*x^(2*k), {k, 0, n/2}]*(a + b 
*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pn, x, 2*k + 1]*x^(2*k), {k, 0, (n - 
1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pn, x] 
 &&  !PolyQ[Pn, x^2]
 

rule 2206
Int[(Px_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> With[{d = 
 Coeff[PolynomialRemainder[Px, a + b*x^2 + c*x^4, x], x, 0], e = Coeff[Poly 
nomialRemainder[Px, a + b*x^2 + c*x^4, x], x, 2]}, Simp[x*(a + b*x^2 + c*x^ 
4)^(p + 1)*((a*b*e - d*(b^2 - 2*a*c) - c*(b*d - 2*a*e)*x^2)/(2*a*(p + 1)*(b 
^2 - 4*a*c))), x] + Simp[1/(2*a*(p + 1)*(b^2 - 4*a*c))   Int[(a + b*x^2 + c 
*x^4)^(p + 1)*ExpandToSum[2*a*(p + 1)*(b^2 - 4*a*c)*PolynomialQuotient[Px, 
a + b*x^2 + c*x^4, x] + b^2*d*(2*p + 3) - 2*a*c*d*(4*p + 5) - a*b*e + c*(4* 
p + 7)*(b*d - 2*a*e)*x^2, x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Px, x 
^2] && Expon[Px, x^2] > 1 && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1]
 
3.1.39.4 Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.15 (sec) , antiderivative size = 274, normalized size of antiderivative = 0.62

method result size
risch \(\frac {-\frac {\left (a b h -2 a c f +b c d \right ) x^{3}}{2 a \left (4 a c -b^{2}\right )}-\frac {\left (b g -2 e c \right ) x^{2}}{2 \left (4 a c -b^{2}\right )}-\frac {\left (2 a^{2} h -a b f -2 a c d +b^{2} d \right ) x}{2 a \left (4 a c -b^{2}\right )}-\frac {2 a g -b e}{2 \left (4 a c -b^{2}\right )}}{c \,x^{4}+b \,x^{2}+a}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (c \,\textit {\_Z}^{4}+\textit {\_Z}^{2} b +a \right )}{\sum }\frac {\left (-\frac {\left (a b h -2 a c f +b c d \right ) \textit {\_R}^{2}}{a \left (4 a c -b^{2}\right )}-\frac {2 \left (b g -2 e c \right ) \textit {\_R}}{4 a c -b^{2}}+\frac {2 a^{2} h -a b f +6 a c d -b^{2} d}{a \left (4 a c -b^{2}\right )}\right ) \ln \left (x -\textit {\_R} \right )}{2 c \,\textit {\_R}^{3}+\textit {\_R} b}\right )}{4}\) \(274\)
default \(\frac {-\frac {\left (a b h -2 a c f +b c d \right ) x^{3}}{2 a \left (4 a c -b^{2}\right )}-\frac {\left (b g -2 e c \right ) x^{2}}{2 \left (4 a c -b^{2}\right )}-\frac {\left (2 a^{2} h -a b f -2 a c d +b^{2} d \right ) x}{2 a \left (4 a c -b^{2}\right )}-\frac {2 a g -b e}{2 \left (4 a c -b^{2}\right )}}{c \,x^{4}+b \,x^{2}+a}+\frac {2 c \left (\frac {\frac {\left (-4 \sqrt {-4 a c +b^{2}}\, a b c g +8 \sqrt {-4 a c +b^{2}}\, a \,c^{2} e \right ) \ln \left (2 c \,x^{2}+\sqrt {-4 a c +b^{2}}+b \right )}{4 c}+\frac {\left (4 \sqrt {-4 a c +b^{2}}\, a^{2} c h +\sqrt {-4 a c +b^{2}}\, a \,b^{2} h -4 \sqrt {-4 a c +b^{2}}\, a b c f +12 \sqrt {-4 a c +b^{2}}\, a \,c^{2} d -\sqrt {-4 a c +b^{2}}\, b^{2} c d -4 a^{2} b c h +8 a^{2} c^{2} f +a \,b^{3} h -2 a \,b^{2} c f -4 a b \,c^{2} d +b^{3} c d \right ) \sqrt {2}\, \arctan \left (\frac {c x \sqrt {2}}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}}{4 c \left (4 a c -b^{2}\right )}+\frac {-\frac {\left (-4 \sqrt {-4 a c +b^{2}}\, a b c g +8 \sqrt {-4 a c +b^{2}}\, a \,c^{2} e \right ) \ln \left (-2 c \,x^{2}+\sqrt {-4 a c +b^{2}}-b \right )}{4 c}+\frac {\left (4 \sqrt {-4 a c +b^{2}}\, a^{2} c h +\sqrt {-4 a c +b^{2}}\, a \,b^{2} h -4 \sqrt {-4 a c +b^{2}}\, a b c f +12 \sqrt {-4 a c +b^{2}}\, a \,c^{2} d -\sqrt {-4 a c +b^{2}}\, b^{2} c d +4 a^{2} b c h -8 a^{2} c^{2} f -a \,b^{3} h +2 a \,b^{2} c f +4 a b \,c^{2} d -b^{3} c d \right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {c x \sqrt {2}}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{2 \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}}{4 c \left (4 a c -b^{2}\right )}\right )}{a \left (4 a c -b^{2}\right )}\) \(665\)

input
int((h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a)^2,x,method=_RETURNVERBOSE)
 
output
(-1/2/a*(a*b*h-2*a*c*f+b*c*d)/(4*a*c-b^2)*x^3-1/2*(b*g-2*c*e)/(4*a*c-b^2)* 
x^2-1/2*(2*a^2*h-a*b*f-2*a*c*d+b^2*d)/a/(4*a*c-b^2)*x-1/2*(2*a*g-b*e)/(4*a 
*c-b^2))/(c*x^4+b*x^2+a)+1/4*sum((-1/a*(a*b*h-2*a*c*f+b*c*d)/(4*a*c-b^2)*_ 
R^2-2*(b*g-2*c*e)/(4*a*c-b^2)*_R+(2*a^2*h-a*b*f+6*a*c*d-b^2*d)/a/(4*a*c-b^ 
2))/(2*_R^3*c+_R*b)*ln(x-_R),_R=RootOf(_Z^4*c+_Z^2*b+a))
 
3.1.39.5 Fricas [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=\text {Timed out} \]

input
integrate((h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a)^2,x, algorithm="fricas 
")
 
output
Timed out
 
3.1.39.6 Sympy [F(-1)]

Timed out. \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=\text {Timed out} \]

input
integrate((h*x**4+g*x**3+f*x**2+e*x+d)/(c*x**4+b*x**2+a)**2,x)
 
output
Timed out
 
3.1.39.7 Maxima [F]

\[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=\int { \frac {h x^{4} + g x^{3} + f x^{2} + e x + d}{{\left (c x^{4} + b x^{2} + a\right )}^{2}} \,d x } \]

input
integrate((h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a)^2,x, algorithm="maxima 
")
 
output
1/2*((b*c*d - 2*a*c*f + a*b*h)*x^3 - a*b*e + 2*a^2*g - (2*a*c*e - a*b*g)*x 
^2 - (a*b*f - 2*a^2*h - (b^2 - 2*a*c)*d)*x)/((a*b^2*c - 4*a^2*c^2)*x^4 + a 
^2*b^2 - 4*a^3*c + (a*b^3 - 4*a^2*b*c)*x^2) + 1/2*integrate((a*b*f - 2*a^2 
*h + (b*c*d - 2*a*c*f + a*b*h)*x^2 + (b^2 - 6*a*c)*d - 2*(2*a*c*e - a*b*g) 
*x)/(c*x^4 + b*x^2 + a), x)/(a*b^2 - 4*a^2*c)
 
3.1.39.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 7495 vs. \(2 (391) = 782\).

Time = 1.73 (sec) , antiderivative size = 7495, normalized size of antiderivative = 17.07 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=\text {Too large to display} \]

input
integrate((h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a)^2,x, algorithm="giac")
 
output
1/2*(b*c*d*x^3 - 2*a*c*f*x^3 + a*b*h*x^3 - 2*a*c*e*x^2 + a*b*g*x^2 + b^2*d 
*x - 2*a*c*d*x - a*b*f*x + 2*a^2*h*x - a*b*e + 2*a^2*g)/((c*x^4 + b*x^2 + 
a)*(a*b^2 - 4*a^2*c)) + 1/16*((2*b^3*c^3 - 8*a*b*c^4 - sqrt(2)*sqrt(b^2 - 
4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*b^3*c + 4*sqrt(2)*sqrt(b^2 - 4*a*c) 
*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b*c^2 + 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqr 
t(b*c + sqrt(b^2 - 4*a*c)*c)*b^2*c^2 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c 
+ sqrt(b^2 - 4*a*c)*c)*b*c^3 - 2*(b^2 - 4*a*c)*b*c^3)*(a*b^2 - 4*a^2*c)^2* 
d - 2*(2*a*b^2*c^3 - 8*a^2*c^4 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt 
(b^2 - 4*a*c)*c)*a*b^2*c + 4*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 
 - 4*a*c)*c)*a^2*c^2 + 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4 
*a*c)*c)*a*b*c^2 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)* 
c)*a*c^3 - 2*(b^2 - 4*a*c)*a*c^3)*(a*b^2 - 4*a^2*c)^2*f + (2*a*b^3*c^2 - 8 
*a^2*b*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b 
^3 + 4*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a^2*b*c + 
 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b^2*c - sqr 
t(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b*c^2 - 2*(b^2 - 
4*a*c)*a*b*c^2)*(a*b^2 - 4*a^2*c)^2*h + 2*(sqrt(2)*sqrt(b*c + sqrt(b^2 - 4 
*a*c)*c)*a*b^6*c - 14*sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a^2*b^4*c^2 
- 2*sqrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a*b^5*c^2 - 2*a*b^6*c^2 + 64*s 
qrt(2)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*a^3*b^2*c^3 + 20*sqrt(2)*sqrt(b*...
 
3.1.39.9 Mupad [B] (verification not implemented)

Time = 8.80 (sec) , antiderivative size = 13024, normalized size of antiderivative = 29.67 \[ \int \frac {d+e x+f x^2+g x^3+h x^4}{\left (a+b x^2+c x^4\right )^2} \, dx=\text {Too large to display} \]

input
int((d + e*x + f*x^2 + g*x^3 + h*x^4)/(a + b*x^2 + c*x^4)^2,x)
 
output
((b*e - 2*a*g)/(2*(4*a*c - b^2)) + (x^2*(2*c*e - b*g))/(2*(4*a*c - b^2)) - 
 (x*(b^2*d + 2*a^2*h - 2*a*c*d - a*b*f))/(2*a*(4*a*c - b^2)) - (x^3*(b*c*d 
 - 2*a*c*f + a*b*h))/(2*a*(4*a*c - b^2)))/(a + b*x^2 + c*x^4) + symsum(log 
((5*b^3*c^4*d^3 + 8*a^3*c^4*f^3 - 96*a^2*c^5*d*e^2 + 72*a^2*c^5*d^2*f - 3* 
a^3*b^3*c*h^3 - 4*a^4*b*c^2*h^3 - 3*b^4*c^3*d^2*f - 32*a^3*c^4*e^2*h + b^5 
*c^2*d^2*h + 8*a^4*c^3*f*h^2 + 6*a^2*b^2*c^3*f^3 - 36*a*b*c^5*d^3 + a*b^5* 
c*d*h^2 + 48*a^3*c^4*d*f*h + 16*a*b^2*c^4*d*e^2 + 18*a*b^2*c^4*d^2*f + 3*a 
*b^3*c^3*d*f^2 - 60*a^2*b*c^4*d*f^2 + 4*a*b^4*c^2*d*g^2 + 16*a^2*b*c^4*e^2 
*f - a*b^3*c^3*d^2*h - 60*a^2*b*c^4*d^2*h - 28*a^3*b*c^3*d*h^2 + a^2*b^4*c 
*f*h^2 - 28*a^3*b*c^3*f^2*h - 24*a^2*b^2*c^3*d*g^2 - 9*a^2*b^3*c^2*d*h^2 + 
 4*a^2*b^3*c^2*f*g^2 - 5*a^2*b^3*c^2*f^2*h + 18*a^3*b^2*c^2*f*h^2 - 8*a^3* 
b^2*c^2*g^2*h - 16*a*b^3*c^3*d*e*g + 96*a^2*b*c^4*d*e*g - 4*a*b^4*c^2*d*f* 
h + 32*a^3*b*c^3*e*g*h + 52*a^2*b^2*c^3*d*f*h - 16*a^2*b^2*c^3*e*f*g)/(8*( 
a^2*b^6 - 64*a^5*c^3 - 12*a^3*b^4*c + 48*a^4*b^2*c^2)) - root(1572864*a^8* 
b^2*c^6*z^4 - 983040*a^7*b^4*c^5*z^4 + 327680*a^6*b^6*c^4*z^4 - 61440*a^5* 
b^8*c^3*z^4 + 6144*a^4*b^10*c^2*z^4 - 256*a^3*b^12*c*z^4 - 1048576*a^9*c^7 
*z^4 + 192*a^3*b^8*c*f*h*z^2 + 57344*a^6*b*c^5*d*h*z^2 + 32768*a^6*b*c^5*e 
*g*z^2 + 96*a^2*b^9*c*d*h*z^2 - 32*a*b^10*c*d*f*z^2 + 6144*a^5*b^4*c^3*f*h 
*z^2 - 2048*a^4*b^6*c^2*f*h*z^2 - 49152*a^5*b^3*c^4*d*h*z^2 - 24576*a^5*b^ 
3*c^4*e*g*z^2 + 15360*a^4*b^5*c^3*d*h*z^2 + 6144*a^4*b^5*c^3*e*g*z^2 - ...